package com.example.dao.service.impl;

import com.example.dao.UserDao;
import com.example.dao.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Wenyi Luo
 * @ClassName UserServiceImpl
 * @Description TODO
 * @date 22/2/27 16:39
 * @version: 1.0
 */

public class UserServiceImpl implements UserService {
    @Override
    public void save() {
        ApplicationContext app=new  ClassPathXmlApplicationContext("applicationContext.xml");
        UserDao userDao=(UserDao)app.getBean("userDao");
        userDao.save();
    }
}
